#!/usr/bin/env python
# coding=utf-8
# __author__ = 'Yunchao Ling'

def TestPing(host):
    import commands

    cmd = "ping -c 10 " + host
    result = commands.getoutput(cmd)
    if result.find("from") != -1:
        return 1
    else:
        return 0

if __name__ == "__main__":
    import sys

    print(TestPing(sys.argv[1]))